package com.javaex.book.pojo;

import java.math.BigDecimal;

public class OrderItem {

	/** 订单项id */
	private Integer id;

	/** 商品名称 */
	private String name;

	/** 商品数量 */
	private Integer count;

	/** 商品单价 */
	private BigDecimal price;

	/** 订单项所属订单的id */
	private String orderId;

	/** 商品总金额 */
	private BigDecimal totalPrice;

	public OrderItem() {
	}

	public OrderItem(String name, Integer count, BigDecimal price, String orderId, BigDecimal totalPrice) {
		this.name = name;
		this.count = count;
		this.price = price;
		this.orderId = orderId;
		this.totalPrice = totalPrice;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getCount() {
		return count;
	}

	public void setCount(Integer count) {
		this.count = count;
	}

	public BigDecimal getPrice() {
		return price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	public void setTotalPrice(BigDecimal totalPrice) {
		this.totalPrice = totalPrice;
	}

	public BigDecimal getTotalPrice() {
		return this.totalPrice;
	}

	@Override
	public String toString() {
		return "OrderItem [id=" + id + ", name=" + name + ", count=" + count + ", price=" + price + ", orderId=" + orderId + "]";
	}
}
